<template>
	<view class="buy-btn-box e-flex ">
		<button class="cart c-white" @tap="openPopup(2)">{{$t('spellgroup.zjgm')}}</button>
		<button class="buy c-white" @tap="openPopup(1)">{{$t('spellgroup.pdgm')}}</button>
	</view>
</template>

<script>
	export default {
		props: {
			activityData:Object
		},
		methods: {
			openPopup(type) {
				if (type === 1) {
					this.$emit('buy')
				} else {
					this.$emit('addCart')
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.buy-btn-box {
		width: 388rpx;
		margin-left: 20rpx;
	
		button {
			flex: 1;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			font-size: 28rpx;
			font-weight: 600;
			padding: 0;
		}
	
		.cart {
			background: #333333;
			border-radius: 200rpx 0 0 200rpx;
		}
	
		.buy {
			background: var(--color-primary);
			border-radius: 0 200rpx 200rpx 0;
		}
	}
</style>